<template>
  <div id="chartContainer_chart_3" style="width: 100%; height: 100%"></div>
</template>
<script setup>
//挂载时候，构建bi展现器实例
import {onMounted} from 'vue';

import config_chart_3 from "@/views/chart/Chart_3/Chart_3_json_config.js"
import jdxsOnUpdateData_chart_3 from "@/views/chart/Chart_3/spjdxsResultsResponse_data.js";
import qyxsOnUpdateData_chart_3 from "@/views/chart/Chart_3/spqyxsResultsResponse_data.js";
import {queryonUpdateDataFrom} from "@/utils/onUpdateDataUtils.js";

function onUpdateData(datasets, params) {
  console.log("....chart_3.......onUpdateData is called.....datasets:", datasets);
  console.log("....chart_3......onUpdateData is called.....params:", params);

  return new Promise((resolve, reject) => {
    resolve(queryonUpdateDataFrom(datasets, params, [jdxsOnUpdateData_chart_3,qyxsOnUpdateData_chart_3]));
  })
}

//导入BI报表对应的完整的数据集
let reportInstance = null;
let option = {reportConfig: config_chart_3, reportData: [], paramsConfig: []};
//option.onUpdateData = onUpdateData;
onMounted(() => {
  try {
    reportInstance = new XZDashboard("#chartContainer_chart_3", option);
    reportInstance.updateData([jdxsOnUpdateData_chart_3,qyxsOnUpdateData_chart_3]);
  } catch (error) {
    console.log("3....chart_3.vue.........onMounted", error);
  }

});
</script>
<style scoped>

</style>
